body,
html {
    height: 100%;
    margin: 0;
    background-color: #d4d4d4;
}

button,
span,
div {
    font-family: Helvetica, Tahoma, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei";
    cursor: default;
}

button,
select,
button span,
.canopen {
    cursor: pointer;
}

.hide {
    display: none !important;
}

.icon {
    display: inline-block;
    vertical-align: middle;
}

.btn-paste .icon {
    width: 32px;
    height: 32px;
    margin-top: 5px;
}

.normal .icon-btn .icon {
    width: 16px;
    height: 16px;
}

.mini .icon-btn .icon {
    width: 14px;
    height: 14px;
}

.normal .icon-data-stat .icon {
    width: 12px;
    height: 12px;
    margin-right: 4px;
}

.mini .icon-data-stat .icon {
    width: 12px;
    height: 12px;
    margin-right: 4px;
}

#app-root {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* layout */
.normal #header-area {
    height: 76px;
    background: #d4d4d4;
    border-bottom: 1px solid #b0b0b0;
    display: flex;
    flex-direction: row;
}

.mini #header-area {
    height: 76px;
    background: #d4d4d4;
    display: flex;
    flex-direction: row;
    width: 165px;
}

.normal #header-area .left-area {
    line-height: 75px;
    flex: 1;
}

.mini #header-area .left-area {
    line-height: 75px;
    width: 136px;
}

.normal #header-area .right-area {
    padding: 2px 10px 2px 0;
    display: flex;
    align-items: flex-end;
}

.mini #header-area .right-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.normal #footer-area {
    height: 29px;
    border-top: 1px solid #b0b0b0;
    display: flex;
}
.mini #footer-area {
    width: 165px;
    height: 16px;
    line-height: 12px;
}

.normal #footer-area .right-area {
    flex: 1;
    text-align: right;
}

.mini #footer-area .right-area {
    text-align: left;
    padding-left: 10px;
}

.normal #task-area {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #f0f0f0;
}

.mini #task-area,
.mini #footer-area .left-area {
    display: none;
}

/* components */
.icon-text-btn .text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #333;
    height: 12px;
}

.btn-paste {
    height: 66px;
    width: 120px;
    border-radius: 5px;
    vertical-align: middle;
    background-color: #d0d0d0;
    border: 2px solid transparent;
    margin: 4px 8px;
    outline: 1px dashed;
}

.normal .icon-btn {
    height: 28px;
    width: 28px;
    fill: #333;
    padding: 0;
    margin-left: 4px;
    border-radius: 4px;
    border: 0;
    vertical-align: middle;
    background-color: transparent;
}

.mini .icon-btn {
    height: 22px;
    width: 24px;
    fill: #333;
    padding: 0;
    border-radius: 4px;
    border: 0;
    font-size: 0;
    background-color: transparent;
}

.normal .text-stat,
.normal .btn-stat {
    height: 20px;
    display: inline-block;
    text-align: left;
    color: #333;
    font-size: 13px;
    line-height: 20px;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.normal #header-area .btn-stat {
    margin: 4px 10px 4px 2px;
    padding: 0 5px;
    direction: rtl;
    background: #f0f0f0;
    border: 1px solid #666;
    border-radius: 2px;
    width: 220px;
}

.normal #header-area .btn-stat.error {
    border: 1px solid #bd403a;
}

.normal #header-area .select-lang {
    height: 20px;
    margin: 4px 10px 4px 0;
    background: #f0f0f0;
    border: 1px solid #666;
    border-radius: 2px;
    outline: none;
    font-size: 13px;
}

.mini #header-area .btn-stat,
.mini #header-area .select-lang,
.mini #header-area .btn-folder {
    display: none;
}

.icon-btn:hover,
.icon-text-btn:hover {
    background-color: #c0c0c0;
}

.icon-btn:active,
.icon-text-btn:active {
    background-color: #b0b0b0;
}

.normal #footer-area .icon-data-stat {
    display: inline-block;
    font-size: 0;
    height: 18px;
    margin-right: 20px;
}

.mini #footer-area .icon-data-stat {
    display: inline-block;
    font-size: 0;
    margin-right: 12px;
}

.icon-data-stat .data {
    display: inline-block;
    color: #333;
    font-size: 12px;
    vertical-align: middle;
}

.normal .btn-github {
    width: 24px;
    height: 24px;
    margin: 2px 5px;
}

.stat-downloading svg {
    fill: #d59720;
}

.stat-waiting svg {
    fill: #929191;
}

.stat-downloaded svg {
    fill: #24a137;
}

.stat-failed svg {
    fill: #bd403a;
}

/* effect */
body #app-root .border-flash-ok {
    animation: flash-green 0.6s linear;
}

body #app-root .border-flash-error {
    animation: flash-red 0.6s linear;
}

@keyframes flash-green {
    0% {
        border-color: #24a137ff;
    }
    20% {
        border-color: #24a13700;
    }
    40% {
        border-color: #24a137ff;
    }
    60% {
        border-color: #24a13700;
    }
    80% {
        border-color: #24a137ff;
    }
    100% {
        border-color: #24a13700;
    }
}

@keyframes flash-red {
    0% {
        border-color: #bd403aff;
    }
    20% {
        border-color: #bd403a00;
    }
    40% {
        border-color: #bd403aff;
    }
    60% {
        border-color: #bd403a00;
    }
    80% {
        border-color: #bd403aff;
    }
    100% {
        border-color: #bd403a00;
    }
}

#task-area .task-box {
    height: 80px;
    display: flex;
    flex-direction: row;
    border: 1px solid #929191;
    border-radius: 4px;
    margin: 6px 5px;
    font-size: 13px;
    color: #222;
    background: #f0f0f0;
}

#task-area .task-box.downloading {
    border-color: #d59720;
}

#task-area .task-box.waiting {
    border-color: #929191;
}

#task-area .task-box.downloaded {
    border-color: #24a137;
}

#task-area .task-box.failed {
    border-color: #bd403a;
}

#task-area .task-thumb {
    width: 135px;
}

#task-area .task-cover {
    width: 120px;
    height: 70px;
    margin: 4px 5px;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

#task-area .task-thumb img {
    width: 120px;
}
#task-area .task-thumb svg {
    width: 96px;
    height: 54px;
}

#task-area .task-info {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    width: 540px;
}
#task-area .task-url,
#task-area .task-title,
#task-area .task-download {
    height: 20px;
    align-items: center;
    width: 540px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#task-area .task-download {
    display: flex;
    flex-direction: row;
    align-items: center;
}

#task-area .task-size {
    display: inline-block;
    min-width: 60px;
    margin-right: 20px;
}
#task-area .task-progressbar {
    width: 200px;
    height: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: flex;
}
#task-area .task-progress {
    width: 25px;
    height: 4px;
    display: inline-block;
    background: #23a237;
}

#task-area .task-status {
    padding: 10px;
    flex: 1;
    display: flex;
    text-align: center;
    align-items: center;
    flex-direction: row-reverse;
}
